272cd82eba8a9a2297d5e33b4bf6d02b515bc010,i18n/src/main/java/net/time4j/format/expert/NumberProcessor.java,NumberProcessor,parse,#CharSequence#ParseLog#AttributeQuery#ParsedEntity#boolean#,390

Before Change


            int digitCount = 0;

            // Wieviele Ziffern hat der ganze Ziffernblock?
            if (numsys.isDecimal()) {
                for (int i = pos; i < len; i++) {
                    int digit = text.charAt(i) - zeroChar;

                    if ((digit >= 0) && (digit <= 9)) {
                        digitCount++;
                    } else {
                        break;
                    }
                }
            } else {
                for (int i = pos; i < len; i++) {
                    if (numsys.contains(text.charAt(i))) {
                        digitCount++;
                    } else {
                        break;
                    }
                }
            }

            effectiveMax = Math.min(effectiveMax, digitCount - this.reserved);
        }

        int minPos = pos + effectiveMin;
        int maxPos = Math.min(len, pos + effectiveMax);
        long total = 0;

        if (numsys.isDecimal()) {
            while (pos < maxPos) {
                int digit = text.charAt(pos) - zeroChar;

After Change


            numsys = this.numberSystem;
            effectiveMax = this.scaleOfNumsys;
            zeroChar = this.zeroDigit;
            decimal = numsys.isDecimal();
        } else {
            numsys = attributes.get(Attributes.NUMBER_SYSTEM, NumberSystem.ARABIC);
            decimal = numsys.isDecimal();
            effectiveMax = this.getScale(numsys);
            zeroChar = (
                attributes.contains(Attributes.ZERO_DIGIT)
                    ? attributes.get(Attributes.ZERO_DIGIT).charValue()
                    : (decimal ? numsys.getDigits().charAt(0) : '0'));
        }

        Leniency leniency = (quickPath ? this.lenientMode : attributes.get(Attributes.LENIENCY, Leniency.SMART));

        if (decimal && (this.fixedWidth || !leniency.isLax())) {
            effectiveMin = this.minDigits;
            effectiveMax = this.maxDigits;
        }